package com.itcast.controller;

import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

//@Controller
@RestController
@RequestMapping("/users")
public class UserController {
//    @RequestMapping(value = "/{id}", method = RequestMethod.POST)
    @PostMapping("/{id}")
    public String save(@PathVariable Integer id) {
        System.out.println("user save....." + id);
        return "{\"module\":\"springmvc\"}";

    }

    //    @RequestMapping(method = RequestMethod.DELETE)
    @DeleteMapping
    public String delete(@RequestBody List<String> list) {
        System.out.println("user save....." + list);
        return "{\"module\":\"springmvc\"}";

    }
}
